Don't reenter gdk_window_process_updates_internal
authorAlexander Larsson <alexl@redhat.com>
Mon, 14 Sep 2009 11:24:55 +0000 (13:24 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 14 Sep 2009 11:52:40 +0000 (13:52 +0200)
Its not correct for recurse gdk_window_process_updates_internal, as
the outer instance will overdraw the inner. So, protect against
gdk_window_process_updates() being called while in an expose
handler.

This shouldn't be a repaint problem, as eventually the idle handler
will cause the updates to be processed.

gdk/gdkwindow.c

index 35600011dced632166bf51c412bb9d1558617a1f..c61b6434bb0eb6ff860854f6f09dca8874012a86 100644 (file)
@@ -5278,7 +5278,11 @@ gdk_window_process_updates (GdkWindow *window,
   if ((impl_window->update_area ||
        impl_window->outstanding_moves) &&
       !impl_window->update_freeze_count &&
-      !gdk_window_is_toplevel_frozen (window))
+      !gdk_window_is_toplevel_frozen (window) &&
+
+      /* Don't recurse into process_updates_internal, we'll
+       * do the update later when idle instead. */
+      impl_window->implicit_paint == NULL)
     {
       gdk_window_process_updates_internal ((GdkWindow *)impl_window);
       gdk_window_remove_update_window ((GdkWindow *)impl_window);